import java.sql.* ;
class FunPurchaseOrder
{
public static void main(String[] s)
{

	try
	{

	java.util.Date utilDate = new java.util.Date() ;
	java.sql.Date date = new java.sql.Date(utilDate.getTime());
	java.sql.Time time = new java.sql.Time(utilDate.getTime() );



		String[] ss = {"1003","100","ab101",date.toString(),time.toString(),"890.00"};

		String[] product_id = {"10","11"};
		String[] quantity = {"15","18"} ;
		String[] price = {"300.40","500.60"} ;
		String[] VAT = {"49.60","49.40"} ;

		//PurchaseOrder po = new PurchaseOrder(ss,product_id,quantity,price,VAT);
		 //po.insertDetailsInPurchaseOrder() ;  //............working successfully.............
		// po.insertDetailsInPurchaseOrderDetails() ; ////............working successfully.............

		PurchaseOrder po = new PurchaseOrder() ;

		/*   //............working successfully.............

		ResultSet rs = po.getProductDetailsOfPurchaseId(1003);

		while(rs.next())
		{
			System.out.println(rs.getInt(1)+" "+rs.getInt(2)+" "+rs.getInt(3)+" "+rs.getFloat(4)+" "+rs.getFloat(5));
		}

		*/




		ResultSet rs = po.getPurchaseDetailsBetweenDates("2012-06-21","2012-06-25");

				while(rs.next())
				{
					System.out.println(rs.getInt(1)+" "+rs.getInt(2)+" "+rs.getString(3)+" "+rs.getString(4)+" "+rs.getString(5));
		}


	}
	catch(Exception e)
	{

	}

}

}